import request from "@/utils/request.js"
// 获取信息接口
export function getUserInfoAPI() {
  return request({
      url:'/my/userinfo',
      method:'GET'
  })
}

// 测试接口
export function testAPI() {
  return request({
    url: '/jobInfo/quertJobProgress',
    method: 'POST',
    data: {}
  })
}

// 根据用户id查询用户任务卡片
export function queryAllJobByUserIdAPI(data) {
  return request({
    url: '/jobInfo/queryAllJobByUserId',
    method: 'POST',
    data
  })
}

// 发布工作
export function createInfoCreateGroupAPI(data) {
  return request({
    url: '/jobInfo/createInfoCreateGroup',
    method: 'POST',
    data
  })
}

// 编辑页面的发布工作，saveThisJob
export function saveThisJobAPI(data) {
  return request({
    url: '/jobInfo/saveThisJob',
    method: 'POST',
    data
  })
}

// 上传文件
export function insertDualJobByExcelAPI(data) {
  return request({
    url: '/dualTable/insertDualJobByExcel',
    method: 'POST',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    params: data
  })
}

// 根据任务批次和任务信息批量持久化任务
export function insertListBydualAPI(data) {
  return request({
    url: '/jobInfo/insertListBydual',
    method: 'POST',
    data
  })
}

// 根据用户id查询该用户所有任务批次
export function queryAllInfoByUserAPI(data) {
  return request({
    url: '/dualInfoTable/queryAllInfoByUser',
    method: 'POST',
    data
  })
}

// 根据任务批次获取任务表头
export function queryDualByInfoIdAPI(data) {
  return request({
    url: '/dualTable/queryDualByInfoId',
    method: 'POST',
    data
  })
}

// 根据用户id查询用户任务卡片
// jobState  	Int	任务状态1:进行中2已完结 3：已超时		
// myWork	Int	1:我发起的2：我参与的		
export function queryAllJobInfoListAPI(data) {
  return request({
    url: '/jobInfo/queryAllJobInfoList',
    method: 'POST',
    data
  })
}

// 即时催办
export function errorInfoAPI(data) {
  return request({
    url: '/jobInfo/errorInfo',
    method: 'POST',
    data
  })
}

// 根据id删除任务
// uuid         	String	主键
export function deleteByIdAPI(data) {
  return request({
    url: '/jobInfo/deleteById',
    method: 'POST',
    data
  })
}

// 根据任务Id查询选择项
export function loadByIdAPI(data) {
  return request({
    url: '/jobInfo/loadById?id',
    method: 'POST',
    data
  })
}

export const loadData = {"_id":null,"actionType":null,"idList":null,"pageNo":1,"pageSize":20,"sortFieldName":null,"sortType":"","primaryName":"UUID","sortNames":[],"sortTypes":[],"sortFields":[],"cascadeSubQueryResult":null,"cascadeSubQueryCondition":null,"uuid":"6","creatorId":"guorz@csg.cn","createTime":1732157805000,"updateTime":1732157805000,"updatorId":null,"createCcount":null,"planOverDate":1732157805000,"beginDate":1732157805000,"orgCode":null,"orgNme":null,"jobName":"test2","errorDay":2,"errorType":1,"jobState":1,"jobContent":"test2","excelId":null,"excelName":null,"excelType":null,"excelSize":null,"groupId":null,"principalId":"wenda@csg.cn","principalName":"文达","wpsUrl":null,"nextDate":null,"interrval":null,"dualInfoId":"1","planOverDateStr":null,"beginDateStr":null,"errorDayStr":null,"errorTypeStr":null,"dataForm":null,"createName":null,"nextDateStr":null,"primaryValue":"6"}

export const testData = {
  "_id": null,
  "actionType": null,
  "idList": null,
  "pageNo": 1,
  "pageSize": 20,
  "sortFieldName": null,
  "sortType": "",
  "primaryName": "ID",
  "sortNames": [],
  "sortTypes": [],
  "sortFields": [],
  "cascadeSubQueryResult": null,
  "cascadeSubQueryCondition": null,
  "id": "370355F918264BBCA2F82064D522AA0B",
  "creatorId": null,
  "createTime": 1730968483177,
  "updateTime": 1730968483177,
  "updatorId": null,
  "dualInfoId": "9A7D9A03787C4EA39D17296849C6CD0C",
  "column1": "a",
  "column2": "b",
  "column3": "c",
  "column4": null,
  "column5": null,
  "column6": null,
  "column7": null,
  "column8": null,
  "column9": null,
  "column10": null,
  "column11": null,
  "column12": null,
  "column13": null,
  "column14": null,
  "column15": null,
  "column16": null,
  "column17": null,
  "column18": null,
  "column19": null,
  "column20": null,
  "column21": null,
  "column22": null,
  "column23": null,
  "column24": null,
  "column25": null,
  "column26": null,
  "column27": null,
  "column28": null,
  "column29": null,
  "column30": null,
  "primaryValue": "370355F918264BBCA2F82064D522AA0B"
}
